<?php
/*
	消息通知设置
	参数：$msgtype,$newsmsg,$tpldata,$uid,$url,$color
*/
defined('BY_JYA') or exit('error');
list($msgtype,$newsmsg,$tpldata,$uid,$url,$color)=$arguments;
$tpl=$this->plugin_setting('basic');
if($msgtype=='setred'){
	if($tpl['setred'] && $tpl['istpl']){
		cfc('account')->sendTplNotice($uid,$tpl['setred'],$tpldata,$url,$color);
		return true;
	}else{
		cfc('account')->sendCustomNotice($newsmsg,$uid);
		return true;
	}
}elseif($msgtype=='getred'){
	if($tpl['getred'] && $tpl['istpl']){
		cfc('account')->sendTplNotice($uid,$tpl['getred'],$tpldata,$url,$color);
		return true;		
	}else{
		cfc('account')->sendCustomNotice($newsmsg,$uid);
		return true;
	}
	
}elseif($msgtype=='buyvip'){
	if($tpl['buyvip'] && $tpl['istpl']){
		cfc('account')->sendTplNotice($uid,$tpl['buyvip'],$tpldata,$url,$color);	
		return true;
	}else{
		cfc('account')->sendCustomNotice($newsmsg,$uid);
		return true;
	}
	
}elseif($msgtype=='getvip'){
	if($tpl['getvip'] && $tpl['istpl']){
		cfc('account')->sendTplNotice($uid,$tpl['getvip'],$tpldata,$url,$color);
		return true;		
	}else{
		cfc('account')->sendCustomNotice($newsmsg,$uid);
		return true;
	}
	
}